package com.zhx.jpa.userHolder;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @author zhanghaixuan
 * @create 2018/1/24-下午2:48
 **/
@Component
public class UserInfoImplHolder {

    @Autowired
    private Map<String,UserInfoInf> userInfoInfs;

    public UserInfoInf  findUserInfoInf(String type){
        String name = type.toLowerCase() + UserInfoInf.class.getSimpleName();

        UserInfoInf userInfoInf = userInfoInfs.get(name);

        if(userInfoInf == null){
            System.out.println("找不到合适的操作类");
        }

        return userInfoInf;
    }


}
